﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;

public partial class Masters_Main : System.Web.UI.MasterPage
{
	protected void Page_Load(object sender, EventArgs e)
	{
	}

	protected void OnNavigate(object s, EventArgs e)
	{
		string page = (s as LinkButton).CommandArgument;
		switch (page)
		{
			case "HomePage": Response.Redirect("");
								break;
			case "LogIn": Response.Redirect("~/Pages/LoginWork/Enter.aspx");
								break;
			case "Registration": Response.Redirect("~/Pages/LoginWork/Registration.aspx");
								break;
			default: Response.Redirect("~/Default.aspx");
						break;
		}
	}

	protected void OnLogOut(object s, EventArgs e)
	{
		FormsAuthentication.SignOut();
		Session.Abandon();
		Response.Redirect("~/Default.aspx");
	}
}
